<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!-- javascript at the bottom for fast page loading -->
<%@ include file="/WEB-INF/jspf/jsDefault.jspf" %>

<f:view>
    <html>
        <head>
            <%@ include file="/WEB-INF/jspf/header.jspf" %>
        </head>
        <body>
            <div id="main">
                <header>
                    <div id="logo">
                        <%@ include file="/WEB-INF/jspf/logoContent.jspf" %>
                    </div>
                    <nav id="barraMenu">
                        <div id="menu_container">
                            <ul class="sf-menu" id="nav">
                                <h:form>
                                    <li ><h:commandLink action="index.jsp">Home</h:commandLink></li>
                                        <li class="due"><a href="javascript:void(0)">Iscrizione</a></li>
                                        <li class="tre"><h:commandLink action="sedi.jsp">Sedi</h:commandLink></li>
                                    <li class="quattro"><h:commandLink action="cercaArticolo.jsp">Articoli</h:commandLink></li>
                                    <li class="cinque"><h:commandLink action="file.jsp">File</h:commandLink></li>
                                         <li><a href="javascript:mostraDialog()">About</a></li>
                                    </h:form>
                            </ul>
                        </div>
                    </nav>
                </header>
                <div id="site_content">
                    <div id="sidebar_container">
                        <h:outputText value="#{Login.message}" style="color:red"/>
                        <%@ include file="/WEB-INF/jspf/loginForm.jspf" %>
                    </div>
                    <div class="content" style="text-align: center">
                        <div id="accordion" class="ui-accordion ui-widget ui-helper-reset" role="tablist">
                            <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-accordion-header-active ui-state-active ui-corner-top ui-accordion-icons" role="tab" id="ui-accordion-accordion-header-0" aria-controls="ui-accordion-accordion-panel-0" aria-selected="true" aria-expanded="true" tabindex="0">
                                Registrazione Studente
                            </h3>
                            <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" id="ui-accordion-accordion-panel-0" aria-labelledby="ui-accordion-accordion-header-0" role="tabpanel" aria-hidden="false"  >
                                <h:outputText value="#{Registrazione.message}" />
                                <h:outputText value="#{Registrazione.message2}" />
                                <h:form>
                                    <table style="font-size: 0.80em">
                                        <tr>
                                            <td>Username:</td>
                                            <td>
                                                <h:inputText id="username" value="#{Registrazione.username}" >
                                                    <f:validator validatorId="usernameValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="username" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Password:</td>
                                            <td>
                                                <h:inputSecret id="pass" value="#{Registrazione.password}" >
                                                    <f:validator validatorId="passwordValidator" />
                                                </h:inputSecret>
                                                <h:message styleClass="messaggioErrore" for="pass" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Conferma Password:</td>
                                            <td>
                                                <h:inputSecret id="cpass" value="#{Registrazione.confermaPassword}">
                                                    <f:validator validatorId="confermaValidator" />
                                                </h:inputSecret>
                                                <h:message styleClass="messaggioErrore" for="cpass" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Nome:</td>
                                            <td>
                                                <h:inputText id="nome" value="#{Registrazione.nome}">
                                                    <f:validator validatorId="nomeValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="nome" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Cognome:</td>
                                            <td>
                                                <h:inputText id="cognome" value="#{Registrazione.cognome}">
                                                    <f:validator validatorId="cognomeValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="cognome" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Codice Fiscale:</td>
                                            <td>
                                                <h:inputText id="fiscale" value="#{Registrazione.codiceFiscale}" >
                                                    <f:validator validatorId="fiscaleValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="fiscale" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Provincia:</td>
                                            <td>
                                                <h:selectOneMenu id="provincia" value="#{Registrazione.provincia}" >
                                                    <f:selectItems value="#{BeanProvince.listaProvince}" />
                                                </h:selectOneMenu>
                                                <h:message styleClass="messaggioErrore" for="provincia" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Città:</td>
                                            <td>
                                                <h:inputText id="citta" value="#{Registrazione.citta}" >
                                                    <f:validator validatorId="cittaValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="citta" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Via:</td>
                                            <td>
                                                <h:inputText id="via" value="#{Registrazione.via}" >
                                                    <f:validator validatorId="viaValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="via" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Cap:</td>
                                            <td>
                                                <h:inputText id="cap" value="#{Registrazione.cap}" >
                                                    <f:validator validatorId="capValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="cap" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Telefono:</td>
                                            <td>
                                                <h:inputText id="Telefono" value="#{Registrazione.telefono}" >
                                                    <f:validator validatorId="telefonoValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="telefono" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Cell: </td>
                                            <td>
                                                <h:inputText id="cell" value="#{Registrazione.cel}" >
                                                    <f:validator validatorId="cellValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="cell" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>e-mail:</td>
                                            <td>
                                                <h:inputText id="email" value="#{Registrazione.email}" >
                                                    <f:validator validatorId="emailValidator" />
                                                </h:inputText>
                                                <h:message styleClass="messaggioErrore" for="email" />
                                            </td>
                                        </tr>
                                    </table>
                                    <h:commandButton value="Registra" action="#{Registrazione.registra}" styleClass="ui-button ui-widget ui-state-default"/>
                                </h:form>
                            </div>
                        </div>
                    </div>
                </div>
                <footer>
                    <p>Copyright &copy; FF-RL 2014</p>
                </footer>
            </div>
            <p>&nbsp;</p>
            <%@ include file="/WEB-INF/jspf/about/contatti.jspf" %>
        </body>
    </html>
</f:view>